<navbar th:fragment="navbar">
		<link rel="stylesheet" th:href="@{/moudle/main/css/navbar.css}" />
		 <div class="container">
			 	  <a class="navbar-brand" href="#">
					  <img src="/moudle/main/img/logo.png" style="display: inline;width: 114px;height: 40px;">
<!--					  lualu-->
<!--					  矿工世界-->
				  </a>
				  <!--向左对齐-->
				  <ul class="nav navbar-nav" >
					  <li><a href="/website/main.html"  class="nav-item"  id="homePage" >首页</a> <span class="nav-indicator"></span></li>
					  <!--<li class="dropdown">
						  <a href="#" data-toggle="dropdown" class="nav-item" id="introductionPage">关于我们
							  <span class="caret"></span>
						  </a>
						  <ul class="dropdown-menu">
							  <li><a href="/website/introduction.html">LOL简介</a></li>
							  <li class="divider"></li>
							  <li><a href="/website/introduction2">成立背景</a></li>
							  <li class="divider"></li>
							  <li><a href="/website/introduction3">战略布局</a></li>
							  <li class="divider"></li>
							  <li><a href="/website/introduction4">团队介绍</a></li>
						  </ul>
					  </li>-->
					  <li><a href="#" class="nav-item" onclick="applyProject()" >悬赏任务</a></li>
<!--					  <li><a href="/website/case.html" class="nav-item" id="casePage" >成功案例</a></li>-->
					  <li>
						  <a href="#" data-toggle="dropdown" class="nav-item" onclick="downloadApp()">APP下载</a>
					  </li>
					  <li><a href="/website/contact.html" class="nav-item"  id="contackPage">联系我们</a></li>
					  <li><a href="/website/services.html" class="nav-item" id="servicesPage" >代币治理方案</a></li>
					  <li><a class="nav-item pointer" onclick="myInfo()" >个人信息</a></li>
					  <!-- <li>
                               &lt;!&ndash;向右对齐&ndash;&gt;
                             <div class="input-group form-group" style="padding-top: 20px;">
                                <input type="text" name=searchValue  id="searchValue"  onkeydown="if(event.keyCode==13){$('#searchNew').click();return false;}"/>
                                 <span class="input-group-addon pointer" id="searchNew" >搜索</span>
                             </div>
                       </li>-->
				  </ul>
			     <div style="margin-top: 20px;float: right;">
					 <span th:if="${user} == null">
							<a data-toggle="modal" class="pointer"  href="#modal-form">登录</a>
					 		<a class="pointer line"  href="/website/register">注册</a>
					 </span>
					 <span th:if="${user} != null">
							欢迎你：[[${user.loginName}]]
							<a class="pointer line" th:href="@{logout}">退出</a>
					 </span>

				 </div>
		  </div>
			<div id="modal-form" class="modal fade" aria-hidden="true">
				<div class="modal-dialog">
					<div class="modal-content">
						<div class="modal-body">
							<div class="row">
								<div class="col-sm-6 b-r">
									<h3 class="m-t-none m-b">登录</h3>

									<p>欢迎登录本站(⊙o⊙)</p>

									<form role="signupForm">
										<div class="form-group">
											<label>用户名：</label>
											<input  name="username" type="text" placeholder="请输入用户名" class="form-control uname">
										</div>
										<div class="form-group">
											<label>密码：</label>
											<input name="password" type="password" placeholder="请输入密码" class="form-control pword">
										</div>
										<div>
											<button class="btn btn-sm btn-primary pull-right m-t-n-xs"
													onclick="cuslogin();return false;"><strong>登录</strong>
											</button>
											<label>
												<input type="checkbox" class="i-checks">自动登录</label>
										</div>
									</form>
								</div>
								<div class="col-sm-6">
									<h4>还不是会员？</h4>
									<p>您可以注册一个账户</p>
									<p class="text-center" style="background: white;margin:40px;">
										<a href="/website/register"><i style="font-size: 32px;color: #e5e6e7;">点我注册</i></a>
									</p>
								</div>
							</div>
						</div>
					</div>
				</div>
			</div>
		  <input th:value="${pageId}" id ="pageId" type="hidden"></input >
		  <th:block th:include="include :: footer" />
		  <script type="text/javascript" th:src="@{/moudle/main/js/navbar.js}"></script>
		  <script th:inline="javascript">
			$('li.dropdown').mouseover(function() {
				$(this).addClass('open dropup');

			}).mouseout(function() {
				$(this).removeClass('open dropup');//open dropup
			});

			$("#searchNew").click(function(event) {
				var searchValue = $("#searchValue").val();
// 				window.location.href="search.html?searchValue="+searchValue;
				var url = "/website/search.html?searchValue="+searchValue;
				if(searchValue==""){
					url = "/index";
				}
				window.open(url);
		    });

			function applyProject() {
				$.modal.alertSuccess('请添加官方客服微信lualu9411 或 发送邮件到<br>lualu9411@163.com')
			}

			function downloadApp(){
				$.modal.msgSuccess('请添加官方客服微信lualu9411 或 发送邮件到lualu9411@163.com')
			}

			function cuslogin() {
				var username = $.common.trim($("input[name='username']").val());
				var password = $.common.trim($("input[name='password']").val());
				var rememberMe = true;
				if(username == ''){
					$.modal.msgWarning("请输入用户名");
					return false;
				}
				if(password == ''){
					$.modal.msgWarning("请输入密码");
					return false;
				}
				$.ajax({
					type: "post",
					url: ctx + "login",
					data: {
						"username": username,
						"password": password,
						"rememberMe": rememberMe
					},
					success: function(r) {
						if (r.code == 0) {
							location.href = '/website';
						} else {
							$.modal.closeLoading();
							$.modal.msgWarning(r.msg);
						}
					}
				});
			}

			function myInfo(){
				var user = [[${user}]]
				if(user == null || user == ''){
					$('#modal-form').modal("show");
				}else{
					window.open("/system/user/profile",'top');
				}
			}

		</script>
</navbar>
